package com.lh.controller;

import com.lh.remote.DemoRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: linghao
 * @since: 2022/6/22
 */
@RestController
@RequestMapping("/dubboDemo")
public class DemoController {

    @Autowired
    private DemoRemote demoRemote;

    @GetMapping("hello/{name}")
    public String hello(@PathVariable String name){
        return demoRemote.hello(name);
    }

    @GetMapping("sentinelDemo/{test}")
    public String sentinelDemo(@PathVariable String test){
        return demoRemote.sentinelDemo(test);
    }
}
